<%@page import="java.util.List"%>
<%@page import="com.jfinal.plugin.activerecord.Page"%>
<%@page import="com.hongye.app.model.GoodsCategroyModel"%>
<%@ page language="java" contentType="text/html; charset=UTF-8" isELIgnored="false"
    pageEncoding="UTF-8"%>
 <% GoodsCategroyModel gcm = (GoodsCategroyModel)request.getAttribute("catedetail"); %>
<!doctype html>
<html class="fixed">
	<head>
		<!-- Basic -->
		<meta charset="UTF-8">
		<meta name="keywords" content="HTML5 Admin Template" />
		<meta name="description" content="Porto Admin - Responsive HTML5 Template">
		<meta name="author" content="okler.net">
		<!-- Mobile Metas -->
		<meta name="viewport" content="width=device-width, initial-scale=1.0, maximum-scale=1.0, user-scalable=no" />
		<!-- Vendor CSS -->
		<link rel="stylesheet" href="../admin/css/bootstrap.css" />
		<link rel="stylesheet" href="../admin/css/font-awesome/css/font-awesome.css" />
        <link rel="stylesheet" href="../admin/css/select2.css" />
		<!-- Theme CSS -->
		<link rel="stylesheet" href="../admin/css/theme.css" />
		<!-- Skin CSS -->
		<link rel="stylesheet" href="../admin/css/default.css" />
		<!-- Theme Custom CSS -->
		<!-- Theme Custom ../admin/css -->
		<script src="../admin/js/modernizr.js"></script>
	</head>
	<body>
		<section role="main" class="content-body" style="margin-top: 50px;">
			<!-- start: page -->
			<section class="panel">
				<header class="panel-heading">
					<h2 class="panel-title">商品类别-详情</h2>
				</header>
				<div class="panel-body">
					<div class="panel-body">
						<p class="lead"> <span class="alternative-font"><%=gcm.get("c_name") %></span> </p>
						<p>
							<ul class="list-inline">
								
								<li>商品类别名称：<input id="name" type="text" name="name" value="<%=gcm.get("c_name") %>" /></li>
								<li>是否展示：是为0，否为1：<input id="showg" type="text" name="name" value="<%int showg=gcm.getInt("showg");
								if(showg==0){out.println("0");}else{out.println("1");} %>" /></li>
								<li>父节点：<input id="pid" type="text" name="name" value="<%=gcm.get("pid") %>" /></li>
							</ul>
						</p>
						
						<div class="mb-xs text-center">
						<a class="btn btn-facebook mb-md ml-xs mr-xs" onclick="editcate()">确定提交 </a>
                        <a class="btn btn-facebook mb-md ml-xs mr-xs" href="../goods/goodsCategroyView" >取消</a>
					</div>
				</div>
			</section>
<!-- Specific Page Vendor -->
<!-- Vendor -->
<script src="../admin/js/jquery.js"></script>
<script src="../admin/js/layer.js"></script>
<!-- Theme Base, Components and Settings -->
<script src="../admin/js/theme.js"></script>
<!-- Theme Custom -->
<script src="../admin/js/theme.custom.js"></script>
<!-- Theme Initialization Files -->
<script src="../admin/js/theme.init.js"></script>
<!-- Examples -->
<script src="../admin/js/tables/examples.datatables.default.js"></script>
<script src="../admin/js/tables/examples.datatables.row.with.details.js"></script>
<script src="../admin/js/tables/examples.datatables.tabletools.js"></script>
<script type="text/javascript">
function editcate(){
	var id = ${id};
	var name = $("#name").val();
	var pid = $("#pid").val();
	var showg = $("#showg").val();
	$.get('../goods/editCategroy?name='+name+'&id='+id+'&pid='+pid+'&showg='+showg,function(data){
		if(data=='suc'){
			layer.msg('修改成功！');
			location.href='../goods/goodsCategroyView';
		}else{
			layer.msg('更新失败...', {icon: 5});
		}
	});
}
</script>
</body>

</html>